package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/*
 * 
 */
@SpringBootApplication
@EnableWebSocket//启动websocket
public class SpringBootDmsApplication {

	public static void main(String[] args) {
		SpringApplication.run(SpringBootDmsApplication.class, args);
	}
	//配置websocket依赖对象
	//在容器中创建bean对象，在websocket中需要使用该对象
	@Bean
	public ServerEndpointExporter endpointExporter() {
		return new ServerEndpointExporter();
		
	}
}
